import Vue from 'vue'
import uView from 'uview-ui';
import App from './App';
import utils from './utils/common.js';
import http from './utils/http.js';
import formats from './utils/formats.js';
import moment from './static/js/moment';
import store from './store';
// import webSocket from '@/utils/websocket.js'

uni.$http = http
// uni.$socket = webSocket
uni.$toast = function(title) {
	uni.showToast({
		title,
		icon: 'none'
	})
};
uni.px2upx = value => (value/(uni.upx2px(100)/100));

Vue.prototype.$store = store

Vue.prototype.$utils = utils;

Vue.prototype.$formats = formats;

Vue.prototype.$moment = moment;

Vue.config.productionTip = false

App.mpType = 'app'

Vue.use(uView);
const app = new Vue({
	store,
	...App
})
app.$mount()
